package xie;

import com.meta.common.utils.HttpUtils;

/**
 * @Author: xieZW
 * @Date: 2022/4/10 17:03
 */
public abstract class ChouXiang {

    protected String a;
    public String b;
    private String c;
    String d;

    void d() {

    }

    public void b() {

    }


    public static void main(String[] args) {
        String result = result("2022-05-01");
        System.out.println("result = " + result);
    }

    public static String result(String date) {
        String httpUrl = "http://timor.tech/api/holiday/info/" + date;
//        String httpUrl = "https://opendata.baidu.com/api.php?tn=wisetpl&format=json&resource_id=39043&query=2022%E5%B9%B410%E6%9C%88&t=1661505137470&cb=op_aladdin_callback1661505137470";
//        String httpUrl = "https://opendata.baidu.com/api.php?tn=wisetpl&format=json&resource_id=39043&query=202209";
        try {
            Object o = HttpUtils.sendGetD(httpUrl);
            System.out.println("o = " + o);
//            JSONObject json = (JSONObject) o.get("holiday");
//            if (json == null) {
//                return "0";
//            }
            return "1";
        } catch (Exception e) {
            return "0";
        }
    }
}
